/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.servlet;

import com.qdu.service.JournalService;
import com.qdu.service.impl.JournalServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *用于删除自己的日志
 * @author Lenovo
 */
@WebServlet("/djs")
public class DeleteJournalServlet extends HttpServlet{
    
    JournalService journalService = new JournalServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String jid=req.getParameter("jid");
        System.out.println("删除日志servlet收到的jid："+jid);
        journalService.deleteJournal(jid);
        //req.getRequestDispatcher("/searchtext.jsp").forward(req, resp);
        //resp.getWriter();
        
    }
    
    
}
